<?php

namespace App\Vilidate\delivery;

/**
 * user控制器下的验证规则类
 */
class DataBackhaulSettingController
{
    public $index = ['rule'=>[], 'msg'=>[]];

    public $view = ['rule'=>[], 'msg'=>[]];

    public $delete = ['rule'=>[], 'msg'=>[]];

    public $create = [
        'rule'=>[
            'name' => 'required',
//            'company_id' => 'required|integer',
            'applet_id' => 'required|integer',
            'ad_type' => 'required|integer',
            'report_method' => 'required|integer',
            'user_activation_report' => 'required|integer',
            'spread_platform_id' => 'required|integer',
            'report_type' => 'required|integer',
        ],
        'msg'=>[
            'name.required' => '名字不能为空',
            'applet_id.required' => '小程序不能为空',
//            'company_id.required' => '公司不能为空',
            'ad_type.required' => '广告类型不能为空',
            'report_method.required' => '上报方式不能为空',
            'user_activation_report.required' => '用户激活上报不能为空',
            'spread_platform_id.required' => '投放平台不能为空',
            'report_type.required' => '上报类型不能为空',
            'ad_type.integer' => '广告类型ID应为整数',
            'report_method.integer' => '上报方式ID应为整数',
            'user_activation_report.integer' => '用户激活上报ID应为整数',
            'spread_platform_id.integer' => '投放平台ID应为整数',
            'report_type.integer' => '上报类型应为整数',
            'applet_id.integer' => '小程序ID应为整数',
            'playlet_id.integer' => '短剧ID应为整数',
        ]
    ];

    public $update = [
        'rule'=>[
            'name' => 'required',
            'applet_id' => 'required|integer',
//            'company_id' => 'required|integer',
            'ad_type' => 'required|integer',
            'report_method' => 'required|integer',
            'user_activation_report' => 'required|integer',
            'spread_platform_id' => 'required|integer',
            'report_type' => 'required|integer',
        ],
        'msg'=>[
            'name.required' => '名字不能为空',
            'applet_id.required' => '小程序不能为空',
//            'company_id.required' => '公司不能为空',
            'ad_type.required' => '广告类型不能为空',
            'report_method.required' => '上报方式不能为空',
            'user_activation_report.required' => '用户激活上报不能为空',
            'spread_platform_id.required' => '投放平台不能为空',
            'report_type.required' => '上报类型不能为空',
            'ad_type.integer' => '广告类型ID应为整数',
            'report_method.integer' => '上报方式ID应为整数',
            'user_activation_report.integer' => '用户激活上报ID应为整数',
            'spread_platform_id.integer' => '投放平台ID应为整数',
            'report_type.integer' => '上报类型应为整数',
            'applet_id.integer' => '小程序ID应为整数',
            'playlet_id.integer' => '短剧ID应为整数',
        ]
    ];
}